package router

import (
	. "cttu/api"
	"github.com/gin-gonic/gin"
)

func InitRouter() *gin.Engine {
	router := gin.Default()
	//IndexApi为一个Handler
	router.GET("/", IndexApi)
	router.GET("/user", User)
	router.GET("/crontab", Corntab)
	//router.POST("/person", AddPersonApi)
	router.GET("/persons", User)
	router.GET("/person/:id", User)
	router.PUT("/person/:id", User)
	router.DELETE("/person/:id", User)
	return router
}
